package com.milepost.workflow.flowinsttask.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.milepost.workflow.flowinsttask.dto.ApproveTaskDto;
import com.milepost.workflow.flowinsttask.dto.ApprovedTaskDto;
import com.milepost.workflow.flowinsttask.entity.FlowInstTaskEntity;
import com.milepost.workflow.flowinsttask.vo.ApproveTaskVo;
import com.milepost.workflow.flowinsttask.vo.ApprovedTaskVo;
import org.apache.ibatis.annotations.Param;

/**
 * @author huarf
 * @Description
 * @create 2022-03-27 17:30
 */
public interface FlowInstTaskMapper extends BaseMapper<FlowInstTaskEntity> {

    /**
     * 查询待办任务列表
     * @param page
     * @param sortName
     * @param sortOrder
     * @param approveTaskDto
     * @return
     */
    Page<ApproveTaskVo> getApproveTaskList(Page<ApproveTaskVo> page,
                                           @Param("sortName") String sortName,
                                           @Param("sortOrder")  String sortOrder,
                                           @Param("approveTaskDto") ApproveTaskDto approveTaskDto);

    /**
     * 查询已办任务列表
     * @param page
     * @param sortName
     * @param sortOrder
     * @param approvedTaskDto
     * @return
     */
    Page<ApprovedTaskVo> getApprovedTaskList(Page<ApprovedTaskVo> page,
                                             @Param("sortName") String sortName,
                                             @Param("sortOrder")  String sortOrder,
                                             @Param("approvedTaskDto") ApprovedTaskDto approvedTaskDto);

}
